package br.com.eproducao.model.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import br.com.eproducao.model.entity.funcionario.Funcionario;
import br.com.eproducao.model.persistence.FuncionarioRepository;

@Service
@Transactional( propagation = Propagation.REQUIRED, rollbackFor = Exception.class )
public class FuncionarioService
{
	@Autowired
	private FuncionarioRepository funcionarioRepository;

	public void cadastrar( Funcionario funcionario )
	{
		funcionarioRepository.save( funcionario );
	}
}
